/**
 * Created with IntelliJ IDEA
 * Description:
 * User:恋恋
 * Date:2022-03-25
 * Time:19:10
 */
import java.util.Arrays;
public class Test {
    public static void main(String[] args) {
        int[] arr={1,2,3,4,5,6,7};
        int[] str=new int[arr.length];
        str=Arrays.copyOf(arr,arr.length);//copyOf(拷贝数组，扩充的长度）
        System.out.println("拷贝后："+Arrays.toString(str));
    }
}
